package com.webchat.ugc.service.mall.im.convert;

import com.webchat.common.util.JsonUtil;
import com.webchat.domain.vo.dto.mall.im.ProductCardMessageDTO;
import com.webchat.domain.vo.dto.mall.im.UgcServerMessageDTO;

public class CardProductMessageConverter extends MessageConverter<ProductCardMessageDTO> {


    @Override
    protected String convertText(UgcServerMessageDTO<ProductCardMessageDTO> msg) {

        return JsonUtil.fromJson(JsonUtil.toJsonString(msg.getMessage()), ProductCardMessageDTO.class).getTitle();
    }
}
